package com.appbee.gdata.youtube.client.search;

public class YoutubeFilter
{
	private String query;
	private int maxResult = 10;
	private int startIndex = 1;
	public String getQuery()
	{
		return query;
	}
	public void setQuery(String query)
	{
		this.query = query;
	}
	public int getMaxResult()
	{
		return maxResult;
	}
	public void setMaxResult(int maxResult)
	{
		this.maxResult = maxResult;
	}
	public int getStartIndex()
	{
		return startIndex;
	}
	public void setStartIndex(int startIndex)
	{
		this.startIndex = startIndex;
	}
	
	public String toString()
	{
		return query;
	}

	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + maxResult;
		result = prime * result + ((query == null) ? 0 : query.hashCode());
		result = prime * result + startIndex;
		return result;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		YoutubeFilter other = (YoutubeFilter) obj;
		if (maxResult != other.maxResult)
			return false;
		if (query == null)
		{
			if (other.query != null)
				return false;
		}
		else if (!query.equals(other.query))
			return false;
		if (startIndex != other.startIndex)
			return false;
		return true;
	}
	
}
